exports.usersSendChatRoomInformation = function (req, res) {

    //获取参数信息
    var bodyParams = req.routeInfo.bodyParams;

    //返回结果
    var resultData = {};

    //用来存储临时数据
    var data =  {}

    //聊天记录的处理
    var conversationContent = bodyParams.content

    //任务流创建
    async.waterfall([

        //检查是否存在这个聊天室
        //发送聊天室消息
        (cb) => {
            db.field('cr_id').where({
                "cr_room_id" : bodyParams.chatroomId,
                "cr_is_delete" : 0
            }).select("socket_chat_room",(rs)=>{
                if(rs.length == 0){
                    return RES.errorResponse(res,"不存在此聊天室");
                }
                data.cr_id = rs[0].cr_id
                cb()
            })
        },
        (cb) => {
            //房间id
            var roomID = "R_" + bodyParams.chatroomId
            //发送的消息内容
            var datas = {
                'userName'  : bodyParams.fromUserName,
                'userId'    : bodyParams.fromUserId,
                'newType'   : bodyParams.newType,
                'content'   : conversationContent,
            }
            socketObj._sendMessagesToRoomStaff(roomID,datas)
            cb()
        }

    ],()=> {

        //返回最终拼接结果
        RES.successResponse(res,resultData);

    });

}